import java.util.Scanner;


public class Code001 {
    public static void main(String[] args) {
    	System.out.println("                     2017Äê9ÔÂ");
		System.out.println("Ò»"+"\t"+"¶þ"+"\t"+"Èý"+"\t"+"ËÄ"+"\t"+"Îå"+"\t"+"Áù"+"\t"+"ÈÕ");
		int i= 0;
		int y =1;
		while(y<=30){
			if(i<4){
				System.out.print(" \t");
			}
			if(i>=4){
				System.out.print(y+"\t");
				y++;
			}
			if(i%7==0){
				System.out.println();
			}
			i++;
		}
	}
}